import request from './request.js'
import request_app from './request_app.js'
// 获取商户商品列表
export const productlist = (params) => {
  return request('/system/product/list', params, 'get');
};
// 新增商品
export const systemproduct = (params) => {
  return request('/system/product', params, 'post');
};
// 商品类别
export const categorylist = (params) => {
  return request('/system/category/list', params, 'get');
};
// 获取用户信息详情
export const merlist = (params) => {
  return request('/system/mer/list', params, 'get');
};
// 查询商品信息详情
export const productInfo = (params) => {
  return request('/system/product/' + params, {}, 'get');
};
// 修改商品 接口
export const productput = (params) => {
  return request('/system/product', params, 'put');
};
//获取个人信息
export const getUserInfo = (params) => {
  return request("/system/mer/" + params, {}, "get");
};
// 删除商品信息
export const productDel = (params) => {
  return request('/system/product/' + params, {}, 'delete');
};
// 活动列表
export const activitylist = (params) => {
  return request('/system/activity/list', params, 'get');
};
// 删除活动
export const activitydel = (params) => {
  return request('/system/activity/' + params, {}, 'delete');
};
// 获取商品信息
export const getMerInfoByid = (params) => {
  return request_app('/localfife/getMerInfoByid', params, 'get');
};
// 添加活动
export const addOrUpdateReId = (params) => {
  return request('/system/activity/addOrUpdateReId', params, 'post');
};
// 获取消费卷
export const activityById = (params) => {
  return request('/system/activity/' + params, {}, 'get');
};

// 根据字典类型查询字典数据信息
export const getDicts = (dictType) => {
  return request_app('system/dict/data/type/' + dictType, {}, 'get');
};
